When analyzing data stored in a database, due to the way the database rules are formulated, a user may not receive the expected results that the user desires for a query. In one example, a user may use a constant in a formula of the query. A constant is a value that does not change when calculating the formula with different sets of operands. The database rules define an implicit behavior of how the constant is handled in the formula. For example, the database rules may determine that a constant behaves like a vector if certain database rules are met based on the formula. However, if the certain database rules are not met, then the constant may behave like a scalar. The scalar representation may use less computing resources than the vectorial representation. This is because the scalar representation does not have its own data representation. That is, the scalar value only exists when it is needed. For example, if the formula calculates the average revenue for a product multiplied by a constant for each month of the year, the constant is needed only when a value for a month exists. That is, if the value for a month is NULL, then the constant is not needed. However, the vectorial representation represents the constant for all values for a component of the formula and is needed when the formula result is aggregated again. For example, if a formula is the average revenue for a product added to a constant for each month of the year, then the vectorial representation of a constant is used to include the constant value for all values of the calendar month.